
// 渲染数据
$(function () {
    initEvent();
});

function initEvent() {
    var datas = {
        interface:'users@infoStatus',           
    };
    common.ajax({
        data: datas,
        success: function (data) {
            if (data.status == '2000') {
                if(data.result){
                    $('#u_true_name').html(data.result.true_name);
                    if(data.result.true_name){
                        $('#msg1').attr('href','/user/cardinfo');
                    }else{
                        $('#msg2').attr('href',"javascript:falert('请您先进行实名认证')");
                    }
                    if(data.result.bank_protocol_no != ''){
                        $('#msg7').attr('style','display:none;');
                    }
                    if(data.result.bank_status > 0){
                        $('#msg2').attr('href','/user/bankcard');
                    }
                    if(data.result.info_status > 0){
                        $('#msg3').attr('href','/user/basicmsg');
                    }
                    if(data.result.work_status > 0){
                        $('#msg4').attr('href','/user/worklist');
                    }
                    if(data.result.relation_status > 0){
                        $('#msg5').attr('href','/user/contact');
                    }
                    if(data.result.daturm_status > 0){
                        $('#msg6').attr('href','/user/idcard');
                    }
                }
            } else if (data.status == '5000') {
                falert(data.msg);
            }
        }
    });
}